home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / Caml Light 0.61 / Source / src / lib / exc.mli < prev    next >
Encoding:
Text File  |  1993-09-24  |  1.0 KB  |  30 lines  |  [TEXT/MPS ]

  1. (* Exceptions *)
  2.  
  3. value raise : exn -> 'a = 1 "raise";;
  4.         (* Raise the given exception value. *)
  5.  
  6. (*** A few general-purpose predefined exceptions. *)
  7.  
  8. exception Out_of_memory;;
  9.         (* Raised by the garbage collector, when there is insufficient
  10.            memory to complete the computation. *)
  11. exception Invalid_argument of string;;
  12.         (* Raised by some library functions, to signal that the given
  13.            arguments do not make sense. *)
  14. exception Failure of string;;
  15.         (* Raised by some library functions, to signal that they are
  16.            undefined on the given arguments. *)
  17. exception Not_found;;
  18.         (* Raised by search library functions, when the required object
  19.            could not be found. *)
  20. exception Exit;;
  21.         (* This exception is not raised by any library function.  It is
  22.        provided for use in your programs. *)
  23.  
  24. value failwith : string -> 'a;;
  25.         (* Raise exception [Failure] with the given string. *)
  26. value invalid_arg : string -> 'a;;
  27.         (* Raise exception [Invalid_argument] with the given string. *)
  28.  
  29.  
  30.